% Dim Action,AllSmsSize If Not MNBoard.FoundUser Then MNBoard.GoToErr(20) MNBoard.Position=MNBoard.Position&" → 用户控制面版" Action=Lcase(Request("Action")) MNBoard.Head "Sms.asp","","处理信件" ShowMySmsInfo() If Len(Action)>10 Then MNBoard.GoToErr(1) Select Case Action Case"save" SaveSms Case"del" Del Case"delall" DelAll Case"write" WriteSms Case Else ReadSms End Select MNBoard.Footer() Set MNBoard =Nothing Sub Del Dim ID,I,Rs ID=MNBoard.CheckNum(request("ID")) Set Rs=MNBoard.Execute("Select MyName,Name From[i_sms] where ID="&ID&" And (Name='"&MNBoard.MyName&"' or MyName='"&MNBoard.MyName&"')") If not Rs.eof then If Lcase(MNBoard.MyName)=Lcase(Rs(0)) Then MNBoard.execute("Update [i_sms] set MyFlag=2 where ID="&ID) Else MNBoard.execute("Update [i_sms] set Flag=2 where ID="&ID) End If MNBoard.Execute("Delete from [i_sms] where MyFlag=2 And Flag=2") MNBoard.Execute("Update [i_User] set SmsSize=SmsSize-1 where ID="&MNBoard.MyID) End If Rs.close Set Rs=Nothing Response.Redirect "sms.asp" End Sub Sub DelAll Dim ID,I ID=MNBoard.CheckNum(request("ID")) I=0 If ID=1 Then'删收箱 I=MNBoard.Execute("select count(*) From[i_Sms] where Name='"&MyName&"' And Flag=0" )(0) MNBoard.Execute("Update [i_sms] Set MyFlag=2 where MyName='"&MNBoard.MyName&"'") ElseIf ID=2 Then'删发箱 I=MNBoard.Execute("select count(*) From[i_Sms] where MyName='"&MyName&"' And Flag<>2" )(0) MNBoard.Execute("Update [i_sms] Set Flag=2 where Name='"&MNBoard.MyName&"'") Else MNBoard.Execute("Update [i_sms] Set Flag=2 where Name='"&MNBoard.MyName&"'") MNBoard.Execute("Update [i_sms] Set MyFlag=2 where MyName='"&MNBoard.MyName&"'") End If If isnull(I) Then I=0 MNBoard.Execute("Update [i_User] set SmsSize="&i&" where ID="&MNBoard.MyID) MNBoard.Execute("Delete from [i_sms] where MyFlag=2 And Flag=2") Session(CacheName & "MyInfo") = Empty MNBoard.Alert"清空所有信件成功!","Sms.asp" End Sub Sub ShowMySmsInfo() Dim SmsSize,content SmsSize=int(SESSION(CacheName & "MyInfo")(20)) AllSmsSize=SmsSize/Int(SESSION(CACHENAME & "MYGRADEINFO")(18))*100 If AllSmsSize>100 Then AllSmsSize=100 IF AllSmsSize<0 Then AllSmsSize=0 IF AllSmsSize>0 And AllSmsSize<1 Then AllSmsSize=1 Content=SmsSize/SESSION(CacheName & "MyGradeInfo")(18)*250 If Content>250 Then Content=250 Content="
" Response.Write MNBoard.ReadSkins("用户控制面版") MNBoard.ShowTable"论坛留言信箱",Content End Sub Sub ReadSms() Dim S,div,Content,Temp,UserPic,Rs,P,strPageInfo,Arr_Rs,I,Caption,bgColor,IUBB,Sqlwhere,title,UserName If Action="elapse" Then Title="发送的信件记录" Sqlwhere="Name='"&MNBoard.MyName&"' and Flag=0" ElseIf Action="colloquy" Then UserName=Request.querystring("Name") If Not MNBoard.Fun.CheckName(UserName) Then MNBoard.GoToErr(1) Title="和"&UserName&"的交谈记录" Sqlwhere="(MyName='"&MNBoard.MyName&"' and Name='"&UserName&"' and MyFlag<2) or (Name='"&MNBoard.MyName&"' And MyName='"&UserName&"' and Flag=0)" Else Title="收取信件" Sqlwhere="MyName='"&MNBoard.MyName&"' and MyFlag<2" End If Set P = New Cls_PageView P.strTableName = "[i_Sms]" P.strPageUrl="?Action="&Action P.strFieldsList = "ID,Name,Content,AddTime,MyFlag,UbbString,Flag,MyName" P.strCondiction = Sqlwhere P.strOrderList = "ID desc" P.strPrimaryKey = "ID" P.intPageSize = 10 P.intPageNow = Request.querystring("page") P.strCookiesName = "Sms"&Action P.InitClass Arr_Rs = P.arrRecordInfo strPageInfo = P.strPageInfo Set P = nothing If IsArray(Arr_Rs) Then Set IUBB=New Cls_IUBB Div="亲爱的MNB用户,您的论坛留言信箱容量已满,请尽快删除一些信件!